pull local: Don't import objects we already have
authorAlexander Larsson <alexl@redhat.com>
Wed, 23 Mar 2016 08:28:17 +0000 (09:28 +0100)
committerColin Walters <walters@verbum.org>
Wed, 23 Mar 2016 18:58:08 +0000 (14:58 -0400)
In particular, I noticed this because the pull failed when trying to
pull from a shallow repo which only had the new objects that was
needed.

https://bugzilla.gnome.org/show_bug.cgi?id=764059

src/libostree/ostree-repo-pull.c

index d27b15ea95b5eaabb426c6cef9dfddfec7d9593d..ecbd73860c2112d7ec616ae5d985497ab7cd1309 100644 (file)
@@ -1188,7 +1188,8 @@ scan_one_metadata_object_c (OtPullData         *pull_data,
 
   if (pull_data->remote_repo_local)
     {
-      if (!ostree_repo_import_object_from (pull_data->repo, pull_data->remote_repo_local,
+      if (!is_stored &&
+          !ostree_repo_import_object_from (pull_data->repo, pull_data->remote_repo_local,
                                            objtype, tmp_checksum,
                                            cancellable, error))
         goto out;